import PATH from '../script/alias';
import vue from 'rollup-plugin-vue';
import resolve from 'rollup-plugin-node-resolve';
import buble from 'rollup-plugin-buble';
import eslint from 'rollup-plugin-eslint';
import babel from 'rollup-plugin-babel';
//
const pkg = require('../package.json');
const external = Object.keys(pkg.dependencies);


export default{
	external,
	globals: { vue: 'Vue' },
	entry: `${PATH.Root}/src/parts/main/index.js`,
	moduleName: 'main_index', 
	plugins: [
	    resolve(),
	    vue({ compileTemplate: true, css: true }),
	    buble({
	      exclude: 'node_modules/**',
	    }),
	    
	    eslint({
	      fix: true,
	      exclude: [
	        'src/styles/**',
	      ]
	    }),
	    
	],
	targets: [
	    { dest:`${PATH.Root}/dist/main/index.cjs.js`, format: 'cjs' },
	    { dest: `${PATH.Root}/dist/main/index.umd.js`, format: 'umd' },
	    { dest: `${PATH.Root}/dist/main/index.iife.js`, format: 'iife' }
	]

};